package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
@TableName("t_product")
public class ProductBean {
    @TableId(value = "pk_productId", type = IdType.AUTO)
    private Integer id;
    @TableField("p_name")
    private String name;
    @TableField("p_perice")
    private Integer perice;
    @TableField("p_createDate")
    private LocalDate createDate;
    @TableField("p_createAddress")
    private String createAddress;
    @TableField("p_photo")
    private String photo;
    @TableField(exist = false)
    private Integer number;

    public ProductBean(String name, Integer perice, LocalDate createDate, String createAddress, String photo, Integer number) {
        this.name = name;
        this.perice = perice;
        this.createDate = createDate;
        this.createAddress = createAddress;
        this.photo = photo;
        this.number = number;
    }

    public ProductBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPerice() {
        return perice;
    }

    public void setPerice(Integer perice) {
        this.perice = perice;
    }

    public LocalDate getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDate createDate) {
        this.createDate = createDate;
    }

    public String getCreateAddress() {
        return createAddress;
    }

    public void setCreateAddress(String createAddress) {
        this.createAddress = createAddress;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    @Override
    public String toString() {
        return "ProductBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", perice=" + perice +
                ", createDate=" + createDate +
                ", createAddress='" + createAddress + '\'' +
                ", photo='" + photo + '\'' +
                ", number=" + number +
                '}';
    }
}
